package com.fa4j.product.category.repository.impl;

import com.fa4j.common.data.repository.impl.BaseRepositoryImpl;
import com.fa4j.product.category.model.CategoryAttribute;
import com.fa4j.product.category.repository.CategoryAttributeRepository;
import com.fa4j.product.category.repository.mapper.CategoryAttributeMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 持久化接口实现-商品分类属性
 *
 * @since 2025-11-22 21:06:24
 */
@Repository
public class CategoryAttributeRepositoryImpl extends BaseRepositoryImpl<CategoryAttributeMapper, CategoryAttribute> implements CategoryAttributeRepository {
    @Override
    public List<CategoryAttribute> queryByCategoryId(Integer categoryId) {
        return super.lambdaQuery()
                .eq(CategoryAttribute::getCategoryId, categoryId)
                .orderByAsc(CategoryAttribute::getPriority)
                .list();
    }
}


